home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of Education
/
World of Education.iso
/
world_f
/
fdplot.zip
/
PLOTN.BAS
< prev
next >
Wrap
BASIC Source File
|
1992-01-06
|
2KB
|
61 lines
100 CLS : PRINT " ATI Function/data plotting program"
105 PRINT" UNREGISTERED SHAREWARE":PRINT
110 DIM FUNCT$(2), DATX(100), DATY(100)
115 DEFINT I-N
120 PRINT "Plot a function (Y/N)? _";:GOSUB 8000
121 IF A$<> "Y" AND A$<> "N" THEN 120 ELSE NF$=A$
130 PRINT "Plot a data set (Y/N)? _";:GOSUB 8000
131 IF A$<> "Y" AND A$<> "N" THEN 130 ELSE ND$=A$
133 IF NF$="N" AND ND$="N" THEN CHAIN "MENU"
134 X$=CHR$(34)
135 SHELL "TYPE T2.BAS > T.BAS"
136 SHELL "ECHO 490 NF$="+X$ + NF$ +X$+ ":ND$=" +X$+ ND$+X$ + " >> T.BAS":
137 SHELL "ECHO 491 RETURN >> T.BAS"
145 'Function entry
150 IF NF$="N" THEN SHELL "ECHO 1100 RETURN >> T.BAS": GOTO 265
175 PRINT : PRINT " Enter function in BASIC format as:"
178 PRINT " Y=f(X) (Example: Y = SIN(X^2) + 3*X^3 + 5*X/7 + 2 )"
183 INPUT ""; TEMP$
194 FUNCT$(1) = STR$(1100) + " X=T"
195 FUNCT$(2) = STR$(1105) + " " + TEMP$
196 I1 = INSTR(1, TEMP$, "Y=")
236 SHELL "ECHO "+ FUNCT$(1)+" >> T.BAS"
238 SHELL "ECHO "+FUNCT$(2)+" >> T.BAS"
240 SHELL "ECHO 1199 RETURN >> T.BAS"
245 'Function defined.
265 REM End function definition/entry
270 REM Data-set entry/storage to disc
275 IF ND$ = "N" THEN 450
285 PRINT "Is data-set already stored on disk? (Y/N) _";:GOSUB 8000
295 IF A$ <> "Y" AND A$ <> "N" THEN 285
300 IF A$ = "N" THEN 305 ELSE 440
305 'THEN
325 PRINT "Enter data-set in pairs of numbers, X,Y";
330 PRINT " , signal end of data with @,@"
335 A$ = " ": B$ = " ": J = 0
340 WHILE A$ <> "@"
345 J = J + 1
350 PRINT "X"; MID$(STR$(J), 2); ","; "Y"; MID$(STR$(J), 2); " ";
355 INPUT A$, B$
360 IF A$ = "@" THEN 380
365 DATX(J) = VAL(A$): DATY(J) = VAL(B$)
380 WEND
385 DTSN = J - 1
390 REM STORE ON DISC
395 FM$ = "PLOTD"
400 OPEN "O", #1, FM$
405 PRINT #1, DTSN
415 FOR J = 1 TO DTSN
417 PRINT #1, DATX(J); ","; DATY(J)
425 NEXT J
430 CORL$ = "-2": PRINT #1, CORL$
435 CLOSE #1
436 PRINT : PRINT "New data saved on disc.": PRINT
440 'ENDIF
450 REM End data def/entry
453 PRINT "Creating Plot program, ...... please wait ......"
520 SHELL "TYPE T3.BAS >> T.BAS": CHAIN "T.BAS"
8000 A$=INKEY$:IF (A$="") GOTO 8000
8010 IF (ASC(A$)> 96) THEN A$=CHR$(ASC(A$)-32)
8020 PRINT A$: RETURN